package com.itheima.zhuanhuan;

import java.io.*;

public class Test03 {

    public static void main(String[] args) throws IOException {
        //从字节->字符
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream("day13\\bbb.txt"),"gbk"));

        String s;
        while((s=reader.readLine())!=null){
            System.out.println(s);
        }
        reader.close();


        String sss="这是一个字符串";
       // BufferedWriter writer = new BufferedWriter(new FileWriter("day13\\ccc.txt"));
        BufferedWriter writer = new BufferedWriter(
                new OutputStreamWriter(new FileOutputStream("day13\\ccc.txt"),"gbk")
        );


        writer.write(sss);
        writer.close();

    }
}
